Backslash ituh khan escape character... Jelas ajah kagak kebaca...
Bukan kagak kebaca sama MySQL nya.. Tapi disini nih... String.replaceAll("\", "\\"); Bikin coba jadi gini... String.replaceAll("\\", "\\\\"); Adelwin Handoyo | Senior Consultant - Wholesale Bank Standard Chartered Bank Plaza By The Park #06-00, 51 Bras Basah Road. Singapore (189554) T : (65) 655 72441 | E adelwin.adel...@sc.com ________________________________ From: jug-indonesia@yahoogroups.com [mailto:jug-indone...@yahoogroups.com] On Behalf Of PUTRI CHAIRINA Sent: Wednesday, December 23, 2009 10:15 AM To: jug-indonesia Subject: [JUG-Indonesia] Merubah Single-Backslash menjad Double-Backslash dalam Java supaya bisa diterima MySQL. Pagi JUGers, Butuh bantuan nie.. Saya sudah cari kemana-mana, tapi belum ketemu juga. Saya mau memasukkan file + alamat direktorinya dari suatu file ke salah satu field dalam database mySQL. Misalkan, file D:\Project\Ini\NamaFile.xls Nah, kalau dalam bentuk seperti diatas, di MySQL tanda "\" itu tidak dibaca. Hasil di mySQL = D:ProjectIniNamaFile.xls. Saya sudah coba menggunakan String.replaceAll("\","\\") di JAVA. Tapi hasilnya tetap D:\Project\Ini\NamaFile.xls (single-backslash). Bagaimana caranya agar menjadi string dengan double-backslash ya? Terima kasih banyak. Putri Chairina http://putrichairina.wordpress.com <http://putrichairina.wordpress.com> http://twitter.com/PutriChairina <http://twitter.com/PutriChairina> This email and any attachments are confidential and may also be privileged. If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments. If received in error, notify the sender immediately and delete this email and any attachments from your system. Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended. Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic. Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB. Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18. The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276. If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.